<?php
$username = $_POST["username"];
$password = $_POST["password"];

function checkLogin($uname,$pswd){
    return $pswd=="1";
}

if(checkLogin($username,$password)){
    echo "登录成功";
}else echo "登录失败";